<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
defined('BASEPATH') || exit('No direct script access allowed');
$this->load->helper('url');
?><link rel="stylesheet" type="text/css" href="/static/css/upload.css">
<form id="ff" method="post" style="margin:10px 0px 0px 10px;display:block;">
	<table style="font-size:12px;" cellspacing="5">
		<tr>
			<td>帐号</td>
			<td><input type="text" class="easyui-validatebox" name="username" required="true"></td>
		</tr>
		<tr>
			<td>密码</td>
			<td><input type="password" class="easyui-validatebox" name="password" required="true"></td>
		</tr>
		<tr>
			<td>确认密码</td>
			<td><input type="password" class="easyui-validatebox" name="repassword" required="true"></td>
		</tr>
		<tr>
			<td>姓名</td>
			<td><input type="text" class="easyui-validatebox" name="name" required="true"></td>
		</tr>
		<tr>
			<td>身份证号</td>
			<td><input type="text" class="easyui-validatebox" name="idno" required="true"></td>
		</tr>
		<tr>
			<td>手机</td>
			<td><input type="text" class="easyui-validatebox" name="mobile" required="true"></td>
		</tr>
		<tr>
			<td>邮箱</td>
			<td><input type="text" class="easyui-validatebox" name="email" required="true"></td>
		</tr>
		<tr>
			<td>是否启用</td>
			<td>
				<input type="radio" class="easyui-validatebox" name="status" value="0">否
				<input type="radio" class="easyui-validatebox" name="status" value="1">是
			</td>
		</tr>
		<tr>
			<td></td>
			<td>
			<button type="submit" class="easyui-linkbutton" iconCls="icon-ok">提交</button>
			<button type="reset" class="easyui-linkbutton" iconCls="icon-clear">清空</button>
			</td>
		</tr>
	</table>
</form>

<script language="javascript">
$(function(){
	$('#ff').form({
		url:'<?php echo site_url('user/insert');?>',
		onSubmit:function(){
			return $(this).form('validate');
		},
		success:function(data){
			data = eval('('+data+')');
			$.messager.alert('信息提示',data.msg,'info');
			if(data.error == 0){
				$('#win').window('close');
				$('#tt').datagrid('reload');
			}
		}
	});
});
</script>